package app.view.component.movie 
{
	import app.facade.App;
	import com.temple.core.CoreMovieClip;
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	/**
	 * ...
	 * @author PHANCUONG87
	 */
	[Embed(source="../../../../../lib/ui.swf", symbol="Result")]
	public class McResult extends CoreMovieClip
	{
		public var txtHightScore:TextField;
		public var btnReplay:SimpleButton;
		public var btnShare:SimpleButton;
		
		public function McResult() 
		{
			btnReplay.addEventListener(MouseEvent.MOUSE_UP, onhanlerEvent);
			btnShare.addEventListener(MouseEvent.MOUSE_UP, onShareEvent);
		}
		
		public function onhanlerEvent(evt:MouseEvent):void 
		{
			sendNotification(App.START_GAME);
		}
		
		public function show():void {
			this.visible = true;
			
		}
		
		public function setMaxScore(maxScore:int):void 
		{
			txtHightScore.text = "HIGHT SCORE: " + maxScore + " metter";
		}
		
		public function hide():void {
			this.visible = false;
		}
		
		public function onShareEvent(evt:MouseEvent):void {
			sendNotification(App.SHARE_HIGHT_SCORE_TO_FACEBOOK);
		}
		
		
	}

}